/**
 * First we will load all of this project's JavaScript dependencies which
 * includes Vue and other libraries. It is a great starting point when
 * building robust, powerful web applications using Vue and Laravel.
 */

//跑cnpm install和 npm i element-ui -S

require('./bootstrap');

window.Vue = require('vue');
import VueRouter from 'vue-router';  //npm install vue-router --save-dev

import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';  //element文当

Vue.use(VueRouter);
Vue.use(ElementUI);

/**
 * Next, we will create a fresh Vue application instance and attach it to
 * the page. Then, you may begin adding components to this application
 * or customize the JavaScript scaffolding to fit your unique needs.
 */

// Vue.component('example', require('./components/Example.vue'));
import Index from './components/Index.vue';
import Create from './components/Create.vue';

const routes = [
    {path: '/', component: Index, name: 'index'},
    {path: '/create', component: Create, name: 'create'},
]

const router = new VueRouter({
    routes
});

const app = new Vue({
    router
}).$mount('#app');